Text formatting utilities to easily format text in the terminal for Java.
var text = TextFormatter.of("blue text here, ", TrueColor.of(50, 50, 255))
.addFormat(FormatOption.BOLD, FormatOption.ITALIC)
.concat(TextFormatter.of("now yellow", SimpleColor.BRIGHT_YELLOW))
.concat(" and back to blue");
System.out.println(text);
Javadocs for the latest stable version are provided online here.
The package is currently available on Repsy and GitHub Packages.
-
Add the following to your
repositories
block:maven("https://repsy.io/mvn/darvil/java")
-
And add the following to your
dependencies
block:implementation("com.darvil:terminal-text-formatter:+")
Note
The +
symbol is a wildcard that will automatically use the latest version of the package.
You can also specify a specific version (e.g. 0.0.1
).